home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: HELP! Modifying the EOF in a file!
- Date: Sat, 16 Mar 96 20:57:40 GMT
- Organization: none
- Message-ID: <827009860snz@genesis.demon.co.uk>
- References: <4i585k$4ia@news.netam.net> <4i5pb4$fae@sparcserver.lrz-muenchen.de> <1996Mar14.122030.9220@friend.kastle.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <1996Mar14.122030.9220@friend.kastle.com>
- rich@kastle.com "Richard Krehbiel" writes:
-
- >ua302aa@lrz-muenchen.de () wrote:
- >
- >>bgc@alpha.netam.net (The Bowling Green Connection) writes:
- >
- >>>I am having trouble shortening the size of a text file...
- >>>Suppose I have a text file with 3 lines of data, then I
- >>>run this program:
- >
- >>>void main() {
- >
- >>Next to no comment :-)
- >
- >Okay, I'll say it: No one should declare void main() and fail to
- >return a valid result code to the execution environment, no matter how
- >successfully the program compiles or runs.
-
- The point is that the program start-up code is only guaranteed to be able
- to call correctly a main function compatible with int main(void) or
- int main(int , char *[]). If you define your main function as returning
- void there is no guarantee that your program can be run at all.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-